<!DOCTYPE html>
<html>
{% load staticfiles %}
<head>
	<meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <title>{% block title %}个人资料{% endblock %}</title>
    <link rel="stylesheet" type="text/css" href="{% static 'css/reset.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/animate.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'js/plugins/queryCity/css/cityLayout.css' %}">

    <link rel="stylesheet" type="text/css" href="{% static 'css/lq.datetimepick.css' %}"/>

{% block custom_css %}
{% endblock %}
    <script src="{% static 'js/jquery.min.js' %}" type="text/javascript"></script>
    <script src="{% static 'js/jquery-migrate-1.2.1.min.js' %}" type="text/javascript"></script>

</head>
  {% block head %}{% endblock %}
<body>
<section class="headerwrap headerwrap2">
    <header>
		<div  class="header2 header">
 			<div class="top">
				<div class="wp">
							<div class="fl"><p style="	font-size: 18px;">健身平台欢迎你！</p></div>
					<!--登录后跳转-->
       {% if request.user.is_authenticated %}
                        <div class="personal">
                            <dl class="user fr">
                                <dd><a style="color: white" class="fr" href="{% url 'users:logout' %}">退出</a></dd>
                                <dd>{% if request.user.type == 'tea' %}
                                    <a class="personcenter fl" style="color: white"
                                       href="{% url 'teacher:teacher_info' %}">个人中心</a>
                                {% else %}
                                    <a class="personcenter fl" style="color: white" href="{% url 'users:user_info' %}">个人中心</a>
                                {% endif %}</dd>
                                <dt><img width="20" height="20" src="{{ MEDIA_URL }}{{ request.user.image }}"/></dt>
                                <dd style="margin-left: 0px;">{{ user.username }}</dd>

                            </dl>
                        </div>
                    {% else %}
                        <a style="color:white ;font-size:15px " class="fr registerbtn"
                           href="{% url 'register' %}">免费注册</a>
                        <a style="color:white;font-size:15px" class="fr loginbtn" href="{% url 'login' %}">登录</a>
                    {% endif %}
                </div>
            </div>

            <div class="middle">
                <div class="wp">
                    <a href="/"><img class="fl" src="/static/images/logo.png"/></a>

                </div>
            </div>
        </div>
    </header>
</section>


<!--crumbs start-->
{% block custom_bread %}
    <section>
        <div class="wp">
            <ul class="crumbs">
                <li><a href="{% url 'index' %}">首页</a>></li>
                <li><a href="{% url 'teacher:teacher_info' %}">个人中心</a>></li>
                <li>个人信息</li>
            </ul>
        </div>
    </section>
{% endblock %}
<section>
    <div class="wp list personal_list">
        <div class="left">
            <ul>
                <li class="active2"><a href="{% url 'teacher:teacher_info' %}">个人资料</a></li>
                <li><a href="{% url 'teacher:selstu' %}">查询学员信息</a></li>
                <li><a href="{% url 'teacher:relcou' %}">教程管理</a></li>
                <li><a href="{% url 'teacher:addclist' %}">发布课程表</a></li>
                <li><a href="{% url 'teacher:myfan' %}">我的粉丝</a></li>
                <li><a href="{% url 'teacher:deletebbs' %}">我的帖子</a></li>
            </ul>
        </div>

        {% block right_content %}
            <div class="right">
                <div class="personal_des ">
                    <div class="head" style="border:1px solid #eaeaea;">
                        <h1>个人信息</h1>
                    </div>
                    <div class="inforcon">

                        <div class="left" style="width:242px;">
                            <iframe id='frameFile' name='frameFile' style='display: none;'></iframe>
                            <form class="clearfix" id="jsAvatarForm" enctype="multipart/form-data" autocomplete="off"
                                  method="post" action="{% url 'users:image_upload' %}" target='frameFile'>
                                <label class="changearea" for="avatarUp">
                            <span id="avatardiv" class="pic">
                                <img width="100" height="100" class="js-img-show" id="avatarShow"
                                     src="{{ MEDIA_URL }}{{ request.user.image }}"/>
                            </span>
                                    <span class="fl upload-inp-box" style="margin-left:70px;">
                                <span class="button btn-green btn-w100" id="jsAvatarBtn">修改头像</span>
                                <input type="file" name="image" id="avatarUp" class="js-img-up"/>
                            </span>
                                </label>
                                {% csrf_token %}
                            </form>

                        </div>
                        <form class="perinform" id="jsEditUserForm" autocomplete="off">
                            <ul class="right">
                                <li>昵&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称：
                                    <input type="text" name="username" id="username" value="{{ request.user.username }}"
                                           maxlength="10">
                                    <i class="error-tips"></i>
                                </li>
                                <li>生&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日：
                                    <input type="text" id="birthday" name="birthday" value="{{ request.user.birthday }}"
                                           readonly="readonly"/>
                                    <i class="error-tips"></i>
                                </li>
                                <li>性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别：
                                    <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="sex" value="male"
                                                                                {% if request.user.gender == 'male' %}checked="checked"{% endif %}>男</label>
                                    <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="sex"
                                                                                      value="female"
                                                                                      {% if request.user.gender == 'female' %}checked="checked"{% endif %}>女</label>
                                </li>
                                <li class="p_infor_city">地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址：
                                    <input type="text" name="address" id="address" placeholder="请输入你的地址"
                                           value="{{ request.user.address }}" maxlength="10">
                                    <i class="error-tips"></i>
                                </li>
                                <li>手&nbsp;&nbsp;机&nbsp;&nbsp;号：
                                    <input type="text" name="mobile" id="mobile" placeholder="请输入你的手机号码"
                                           value="{{ request.user.mobile }}" maxlength="10">
                                </li>

                                <li class="button heibtn">
                                    <input type="button" id="jsEdit" value="保存">
                                </li>
                            </ul>
                            {% csrf_token %}
                        </form>
                    </div>
                </div>
            </div>
        {% endblock %}

    </div>
</section>


<div class="dialog" id="jsDialog">
    <div class="successbox dialogbox" id="jsSuccessTips">
        <h1>成功提交</h1>
        <div class="close jsCloseDialog"><img src="/static/images/dig_close.png"/></div>
        <div class="cont">
            <h2>您的需求提交成功！</h2>
            <p></p>
        </div>
    </div>
    <!--提示弹出框-->
    <div class="bidtips dialogbox promptbox" id="jsComfirmDialig">
        <h1>确认提交</h1>
        <div class="close jsCloseDialog"><img src="/static/images/dig_close.png"/></div>
        <div class="cont">
            <h2>您确认提交吗？</h2>
            <dd class="autoTxtCount">
                <div class="button">
                    <input type="button" class="fl half-btn" value="确定" id="jsComfirmBtn"/>
                    <span class="fr half-btn jsCloseDialog">取消</span>
                </div>
            </dd>
        </div>
    </div>
    <div class="resetpwdbox dialogbox" id="jsResetDialog">
        <h1>修改密码</h1>
        <div class="close jsCloseDialog"><img src="/static/images/dig_close.png"/></div>
        <div class="cont">
            <form id="jsResetPwdForm" autocomplete="off">
                <div class="box">
                    <span class="word2">新&nbsp;&nbsp;密&nbsp;&nbsp;码</span>
                    <input type="password" id="pwd" name="password1" placeholder="6-20位非中文字符"/>
                </div>
                <div class="box">
                    <span class="word2">确定密码</span>
                    <input type="password" id="repwd" name="password2" placeholder="6-20位非中文字符"/>
                </div>
                <div class="error btns" id="jsResetPwdTips"></div>
                <div class="button">
                    <input id="jsResetPwdBtn" type="button" value="提交"/>
                </div>
                {% csrf_token %}
            </form>
        </div>
    </div>
</div>
<div class="bg" id="dialogBg"></div>


<script src="{% static 'js/selectUi.js' %}" type='text/javascript'></script>
<script type="text/javascript" src="{% static 'js/plugins/laydate/laydate.js' %}"></script>
<script src="{% static 'js/plugins/layer/layer.js' %}"></script>
<script src="{% static 'js/plugins/queryCity/js/public.js' %}" type="text/javascript"></script>
<script src="{% static 'js/unslider.js' %}" type="text/javascript"></script>
<script src="{% static 'js/plugins/jquery.scrollLoading.js' %}" type="text/javascript"></script>
<script src="{% static 'js/validateDialog.js' %}" type="text/javascript"></script>
<script src="{% static 'js/deco-common.js' %}" type="text/javascript"></script>
<script src='{% static 'js/plugins/jquery.upload.js' %}' type='text/javascript'></script>
<script src="{% static 'js/validate.js' %}" type="text/javascript"></script>
<script src="{% static 'js/deco-user.js' %}"></script>


<script>

    var sta = {

        elem: '#sta_time',
        format: 'YYYY-MM-DD',
        istime: true,
        istoday: false,
        start: laydate.now(0, "YYYY-MM-DD"),

    };

    laydate(sta);


    var end = {

        elem: '#end_time',
        format: 'YYYY-MM-DD',
        istime: true,
        istoday: false,
        start: laydate.now(0, "YYYY-MM-DD"),

    };

    laydate(end);

</script>

</body>
</html>
